<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>添加教材版本 - 智慧题库</title>
    <link href="../assets/css/tailwind.css" rel="stylesheet">
    <link href="../assets/css/font-awesome.min.css" rel="stylesheet">
</head>
<body class="font-inter bg-gray-50 min-h-screen flex flex-col bg-education">
    <!-- 背景装饰元素 -->
    <div class="absolute inset-0 overflow-hidden -z-10">
        <div class="absolute top-10 left-10 w-40 h-40 rounded-full bg-primary/10 animate-float">
            <div class="w-full h-full flex items-center justify-center text-primary/20 text-6xl education-icon">
                <i class="fa fa-plus"></i>
            </div>
        </div>
        <div class="absolute bottom-20 right-20 w-60 h-60 rounded-full bg-secondary/10 animate-float" style="animation-delay: -2s">
            <div class="w-full h-full flex items-center justify-center text-secondary/20 text-7xl education-icon">
                <i class="fa fa-book"></i>
            </div>
        </div>
    </div>

    <!-- 顶部导航栏 -->
    <header class="sticky top-0 z-50 bg-white/90 backdrop-blur-sm shadow-sm transition-all duration-300">
        <div class="container mx-auto px-4 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <div class="w-10 h-10 bg-primary/10 rounded-xl flex items-center justify-center text-primary">
                    <i class="fa fa-question-circle"></i>
                </div>
                <h1 class="text-xl font-bold text-dark ml-0 md:ml-[-2rem]">智慧题库管理系统</h1>
            </div>
            
            <!-- 顶部导航 -->
            <div class="hidden md:flex items-center space-x-2">
                <a href="AdminDashboard.html" class="nav-item">
                    <i class="fa fa-home mr-2"></i> 控制面板
                </a>
                <a href="QuestionManagement.html" class="nav-item">
                    <i class="fa fa-book mr-2"></i> 题库管理
                </a>
                <a href="ExamManagement.html" class="nav-item">
                    <i class="fa fa-graduation-cap mr-2"></i> 考试管理
                </a>
                <a href="TextbookVersionList.html" class="nav-item active">
                    <i class="fa fa-archive mr-2"></i> 教材管理
                </a>
                <a href="StatisticsAnalysis.html" class="nav-item">
                    <i class="fa fa-bar-chart mr-2"></i> 数据分析
                </a>
                <a href="SystemSettings.html" class="nav-item">
                    <i class="fa fa-cog mr-2"></i> 系统设置
                </a>
            </div>
            
            <div class="flex items-center space-x-4">
                <button class="p-2 text-muted hover:text-primary transition-colors relative">
                    <i class="fa fa-bell"></i>
                    <span class="absolute top-1 right-1 w-2 h-2 bg-accent rounded-full"></span>
                </button>
                <div class="flex items-center space-x-2">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像" class="w-8 h-8 rounded-full object-cover border-2 border-primary/20">
                    <span class="hidden md:inline text-sm font-medium text-dark">张老师</span>
                    <i class="fa fa-angle-down text-muted"></i>
                </div>
                <button class="md:hidden p-2 text-muted hover:text-primary transition-colors" id="mobile-menu-button">
                    <i class="fa fa-bars"></i>
                </button>
            </div>
        </div>
    </header>

    <!-- 主内容区 -->
    <main class="flex-grow flex">
        <!-- 左侧导航栏 -->
        <aside id="sidebar" class="w-64 bg-sidebar-bg shadow-sidebar transition-all duration-300 h-[calc(100vh-64px)] sticky top-[64px] overflow-y-auto">
            <!-- 教材管理菜单 -->
            <div class="p-4 border-b border-gray-200">
                <h3 class="text-lg font-bold text-center text-muted uppercase tracking-wider">教材管理</h3>
            </div>
            <div class="p-2">
                <div class="sidebar-item">
                    <i class="fa fa-list"></i>
                    <span>教材列表</span>
                </div>
                <div class="sidebar-item active">
                    <i class="fa fa-plus-circle"></i>
                    <span>添加教材</span>
                </div>
                <div class="sidebar-item">
                    <i class="fa fa-list mr-2"></i> 版本管理
                </div>
                <div class="sidebar-item">
                    <i class="fa fa-sitemap mr-2"></i> 章节管理
                </div>
                <div class="sidebar-item">
                    <i class="fa fa-lightbulb-o mr-2"></i> 知识点管理
                </div>
                <div class="sidebar-item">
                    <i class="fa fa-upload"></i>
                    <span>教材导入</span>
                </div>
            </div>
        </aside>

        <!-- 内容区域 -->
        <div class="flex-grow p-6">
            <!-- 页面标题 -->
            <div class="mb-8">
                <div class="flex items-center justify-between">
                    <div>
                        <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-dark">添加教材版本</h2>
                        <p class="text-muted mt-2">创建新的教材版本，设置基本信息并关联章节结构</p>
                    </div>
                    <div class="flex space-x-3">
                        <button class="px-4 py-2 bg-white border border-gray-300 text-dark rounded-lg shadow-sm hover:bg-gray-50 transition-colors">
                            <i class="fa fa-eye mr-2"></i>预览
                        </button>
                        <button class="px-4 py-2 bg-primary text-white rounded-lg shadow-sm hover:bg-primary/90 transition-colors">
                            <i class="fa fa-save mr-2"></i>保存版本
                        </button>
                    </div>
                </div>
            </div>
            
            <!-- 表单内容区 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                <!-- 左侧：基本信息 -->
                <div class="lg:col-span-2 space-y-6">
                    <!-- 基本信息表单 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-6 flex items-center">
                            <i class="fa fa-info-circle text-primary mr-2"></i>基本信息
                        </h3>
                        
                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">所属教材 *</label>
                                <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                                    <option value="">请选择教材</option>
                                    <option value="math">高中数学（必修）</option>
                                    <option value="physics">高中物理（必修）</option>
                                    <option value="chemistry">高中化学（必修）</option>
                                    <option value="biology">高中生物（必修）</option>
                                </select>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本名称 *</label>
                                <input type="text" placeholder="请输入版本名称" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">出版社 *</label>
                                <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                                    <option value="">请选择出版社</option>
                                    <option value="pep">人民教育出版社</option>
                                    <option value="jsfep">江苏教育出版社</option>
                                    <option value="bnup">北京师范大学出版社</option>
                                    <option value="sste">上海科学技术出版社</option>
                                </select>
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本号 *</label>
                                <input type="text" placeholder="如：v1.0.0" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">出版年份 *</label>
                                <input type="number" placeholder="如：2023" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                            </div>
                            
                            <div>
                                <label class="block text-sm font-medium text-muted mb-1">版本状态</label>
                                <select class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50">
                                    <option value="draft">草稿版本</option>
                                    <option value="latest">最新版本</option>
                                    <option value="history">历史版本</option>
                                </select>
                            </div>
                        </div>
                        
                        <div class="mt-6">
                            <label class="block text-sm font-medium text-muted mb-1">版本描述</label>
                            <textarea placeholder="请输入版本描述信息..." class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/50" rows="4"></textarea>
                        </div>
                    </div>
                    
                    <!-- 章节结构 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <div class="flex items-center justify-between mb-6">
                            <h3 class="text-lg font-bold text-dark flex items-center">
                                <i class="fa fa-list text-primary mr-2"></i>章节结构
                            </h3>
                            <div class="flex space-x-2">
                                <button class="px-3 py-1 bg-primary text-white rounded-lg text-sm hover:bg-primary/90 transition-colors">
                                    <i class="fa fa-plus mr-1"></i>添加章节
                                </button>
                                <button class="px-3 py-1 bg-white border border-gray-300 text-dark rounded-lg text-sm hover:bg-gray-50 transition-colors">
                                    <i class="fa fa-upload mr-1"></i>导入章节
                                </button>
                            </div>
                        </div>
                        
                        <!-- 章节列表 -->
                        <div class="space-y-4">
                            <div class="border border-gray-200 rounded-lg p-4">
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center space-x-3">
                                        <i class="fa fa-book text-primary"></i>
                                        <span class="font-medium text-dark">第一章 集合与常用逻辑用语</span>
                                    </div>
                                    <div class="flex space-x-2">
                                        <button class="text-primary hover:text-primary/80">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </div>
                                </div>
                                <div class="mt-3 pl-6 space-y-2">
                                    <div class="flex items-center justify-between text-sm">
                                        <span class="text-dark">1.1 集合的概念</span>
                                        <div class="flex space-x-2">
                                            <button class="text-primary hover:text-primary/80">
                                                <i class="fa fa-edit"></i>
                                            </button>
                                            <button class="text-red-500 hover:text-red-600">
                                                <i class="fa fa-trash"></i>
                                            </button>
                                        </div>
                                    </div>
                                    <div class="flex items-center justify-between text-sm">
                                        <span class="text-dark">1.2 集合的基本关系</span>
                                        <div class="flex space-x-2">
                                            <button class="text-primary hover:text-primary/80">
                                                <i class="fa fa-edit"></i>
                                            </button>
                                            <button class="text-red-500 hover:text-red-600">
                                                <i class="fa fa-trash"></i>
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="border border-gray-200 rounded-lg p-4">
                                <div class="flex items-center justify-between">
                                    <div class="flex items-center space-x-3">
                                        <i class="fa fa-book text-primary"></i>
                                        <span class="font-medium text-dark">第二章 一元二次函数、方程和不等式</span>
                                    </div>
                                    <div class="flex space-x-2">
                                        <button class="text-primary hover:text-primary/80">
                                            <i class="fa fa-edit"></i>
                                        </button>
                                        <button class="text-red-500 hover:text-red-600">
                                            <i class="fa fa-trash"></i>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- 添加章节按钮 -->
                        <div class="mt-4 text-center">
                            <button class="px-4 py-2 border-2 border-dashed border-gray-300 rounded-lg text-muted hover:border-primary hover:text-primary transition-colors">
                                <i class="fa fa-plus mr-2"></i>添加新章节
                            </button>
                        </div>
                    </div>
                </div>
                
                <!-- 右侧：辅助信息 -->
                <div class="lg:col-span-1 space-y-6">
                    <!-- 操作提示 -->
                    <div class="bg-blue-50 border border-blue-200 rounded-2xl p-6">
                        <h3 class="text-lg font-bold text-blue-800 mb-4 flex items-center">
                            <i class="fa fa-lightbulb-o text-blue-600 mr-2"></i>操作提示
                        </h3>
                        <div class="space-y-3 text-sm text-blue-700">
                            <div class="flex items-start space-x-2">
                                <i class="fa fa-check-circle mt-0.5"></i>
                                <span>版本名称应包含教材类型和版本标识</span>
                            </div>
                            <div class="flex items-start space-x-2">
                                <i class="fa fa-check-circle mt-0.5"></i>
                                <span>版本号建议使用语义化版本号格式</span>
                            </div>
                            <div class="flex items-start space-x-2">
                                <i class="fa fa-check-circle mt-0.5"></i>
                                <span>章节结构可以在保存后继续编辑</span>
                            </div>
                            <div class="flex items-start space-x-2">
                                <i class="fa fa-check-circle mt-0.5"></i>
                                <span>支持从Excel文件导入章节结构</span>
                            </div>
                        </div>
                    </div>
                    
                    <!-- 快速操作 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-4 flex items-center">
                            <i class="fa fa-bolt text-primary mr-2"></i>快速操作
                        </h3>
                        <div class="space-y-3">
                            <button class="w-full px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors">
                                <i class="fa fa-copy mr-2"></i>复制现有版本
                            </button>
                            <button class="w-full px-4 py-2 bg-white border border-gray-300 text-dark rounded-lg hover:bg-gray-50 transition-colors">
                                <i class="fa fa-upload mr-2"></i>导入章节模板
                            </button>
                            <button class="w-full px-4 py-2 bg-white border border-gray-300 text-dark rounded-lg hover:bg-gray-50 transition-colors">
                                <i class="fa fa-download mr-2"></i>下载模板文件
                            </button>
                        </div>
                    </div>
                    
                    <!-- 版本信息 -->
                    <div class="bg-white rounded-2xl p-6 shadow-card">
                        <h3 class="text-lg font-bold text-dark mb-4 flex items-center">
                            <i class="fa fa-info text-primary mr-2"></i>版本信息
                        </h3>
                        <div class="space-y-3 text-sm">
                            <div class="flex justify-between">
                                <span class="text-muted">创建时间</span>
                                <span class="text-dark">2023-12-15 15:30</span>
                            </div>
                            <div class="flex justify-between">
                                <span class="text-muted">创建者</span>
                                <span class="text-dark">张老师</span>
                            </div>
                            <div class="flex justify-between">
                                <span class="text-muted">章节数量</span>
                                <span class="text-dark">2章</span>
                            </div>
                            <div class="flex justify-between">
                                <span class="text-muted">小节数量</span>
                                <span class="text-dark">6节</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>

    <!-- JavaScript -->
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // 移动端菜单切换
            const mobileMenuButton = document.getElementById('mobile-menu-button');
            const sidebar = document.getElementById('sidebar');
            
            if (mobileMenuButton && sidebar) {
                mobileMenuButton.addEventListener('click', function() {
                    sidebar.classList.toggle('translate-x-0');
                    sidebar.classList.toggle('-translate-x-full');
                });
            }
            
            // 初始化移动端侧边栏状态
            function checkScreenSize() {
                if (window.innerWidth < 768) {
                    sidebar.classList.add('-translate-x-full');
                    sidebar.classList.remove('translate-x-0');
                } else {
                    sidebar.classList.remove('-translate-x-full');
                    sidebar.classList.add('translate-x-0');
                }
            }
            
            // 初始检查
            checkScreenSize();
            
            // 窗口大小变化时检查
            window.addEventListener('resize', checkScreenSize);
        });
    </script>
</body>
</html> 